import { Pressable, StyleSheet, View } from "react-native";
import Icon from "react-native-vector-icons/Ionicons";

interface BackButtonProps {
  onPress: () => void;
}
const BackButton = ({ onPress }: BackButtonProps) => (
  <Pressable onPress={onPress}>
    <View style={styles.backButton}>
      <Icon name="chevron-back" size={24} color="black" />
    </View>
  </Pressable>
);

const styles = StyleSheet.create({
  backButton: {
    width: 36,
    height: 36,
    borderRadius: 18,
    borderWidth: 1,
    borderColor: "rgba(0,0,0,0.1)",
    justifyContent: "center",
    alignItems: "center",
  },
});

export default BackButton;
